package com.san.InterfManage.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.san.InterfManage.dao.InterfManageDao;
import com.san.InterfManage.domain.InterfManageDo;
import com.san.InterfManage.service.InterfManageService;
import com.san.common.utils.PageUtils;
import com.san.common.utils.Query;
@Service
public class InterfManageServiceImpl implements InterfManageService {
	@Autowired
	private InterfManageDao interManageMapper;
	
	public PageUtils findListSource(Query query)throws Exception{
		List<InterfManageDo> list = interManageMapper.findListSource(query);
		int total = interManageMapper.findListSourceCount(query);

		PageUtils pageUtils = new PageUtils(list, total);

		return pageUtils;
	}
	/**
	 * 添加接口
	 */
	@Override
	public int add(InterfManageDo interfManageDo) throws Exception {
		// TODO Auto-generated method stub
		return interManageMapper.save(interfManageDo);
	}
	@Override
	public Object getById(Long manageId) throws Exception {
		// TODO Auto-generated method stub
		return interManageMapper.getById(manageId);
	}

	@Override
	public int save(Object obj) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int update(InterfManageDo interfManageDo) throws Exception {
		// TODO Auto-generated method stub
		return interManageMapper.update(interfManageDo);
	}

	@Override
	public int remove(Long manageId) throws Exception {
		// TODO Auto-generated method stub
		return interManageMapper.remove(manageId);
	}

	@Override
	public int batchRemove(Long[] ids) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int changeStatus(InterfManageDo interfManageDo) throws Exception {
		// TODO Auto-generated method stub
		return interManageMapper.changeStatus(interfManageDo);
	}
	@Override
	public int doEdit(Object obj) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}


}
